package com.xiaoyi.controller.businessController;

import com.xiaoyi.service.BusinessInfoService;
import com.xiaoyi.service.impl.BusinessInfoServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet(urlPatterns = "/businessHome.do")
public class BusinessHomeController extends HttpServlet {
    private BusinessInfoService bis=new BusinessInfoServiceImpl();
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        //调用业务类，完成跳转Home页面逻辑
        String url=bis.goBusHome(req);
        resp.setHeader("Content-Type","text/html;charset=utf-8");
        req.getRequestDispatcher(url).forward(req,resp);
    }
}
